#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
	ll n;
	cin >> n;
	printf("%02lld:%02lld:%02lld\n",n/3600000%24,n%3600000/60000%60,n%3600000%60000/1000%60);
	return 0;
}